<?php
/* @var $this UsersController */
/* @var $model Users */

$this->breadcrumbs = array(
    'Users' => HSUrl::backendUsersUrl()
);
?>
<a href="<?php echo HSUrl::backendCreateUsersUrl() ?>" class="btn btn-default">Create</a>
<div id="" class="admin-main-wrapper form-inline">
    <div class="dataTables_wrapper">
        <?php $this->widget('zii.widgets.grid.CGridView', array(
            'id' => 'users-grid',
            'dataProvider' => $model->search(),
            'filter' => $model,
            'columns' => array(
                'id',
                'username',
                'email',
                array('name' => 'role', 'value' => '$data->role == 0 ? "Admin" : "User" '),
                array(
                    'class' => 'CButtonColumn',
                    'template' => '{view}{update}{delete}{changePass}',
                    'buttons' => array(
                        'changePass' => array
                        (
                            'label' => 'Change password',
                            'url' => 'HSUrl::backendUpdatePasswordUserUrl($data->id)',
                        ))
                ),
            ),
        )); ?>
    </div>
</div>